﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Principal;
using Logistics.DataManage.DAL;

namespace Logistics
{
    /// <summary>
    /// 
    /// </summary>
    public class UserIdentity : GenericIdentity
    {
        public UserIdentity(OUser user)
            : base(user.UserID, "passport")
        {
            this.UserID = user.UserID;
            this.RealName = user.UserName;
            this.LoginTime = DateTime.Now;

            this.SiteID =GlobalObjects.GSetting.MachineSiteId;
            this.SiteName = GlobalObjects.GSetting.MachineSiteName;//
            this.OutletId = GlobalObjects.GSetting.MachineOutletId;
        }

        #region Property
        /// <summary>
        /// 员工的工号
        /// </summary>
        public string UserID
        {
            get; set;
        }

        /// <summary>
        /// 站点ID
        /// </summary>
        public string SiteID
        {
            get;set;
        }

        /// <summary>
        /// 站点名称
        /// </summary>
        public string SiteName
        {
            get;
            set;
        }

        /// <summary>
        /// 网点ID
        /// </summary>
        public string OutletId
        {
            get;
            set;
        }

        /// <summary>
        /// 员工的真实姓名
        /// </summary>
        public string RealName
        {
            get;
            set;
        }
        public DateTime LoginTime
        {
            get;
            set;
        }
        #endregion
    }
}
